﻿@model Model.Entities.UserVehicle

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div> 
    @foreach (var item in Model.Images){
		 <div>@item.Path</div>
	} 
</div>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>UserVehicle</legend>

        @Html.HiddenFor(model => model.UserVehicleID)

        <div class="editor-label">
            @Html.LabelFor(model => model.ShortDesc)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ShortDesc)
            @Html.ValidationMessageFor(model => model.ShortDesc)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LongDesc)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LongDesc)
            @Html.ValidationMessageFor(model => model.LongDesc)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Year)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Year)
            @Html.ValidationMessageFor(model => model.Year)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.State)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.State)
            @Html.ValidationMessageFor(model => model.State)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.VehicleIdentifier)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.VehicleIdentifier)
            @Html.ValidationMessageFor(model => model.VehicleIdentifier)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.VehicleIdentifierCard)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.VehicleIdentifierCard)
            @Html.ValidationMessageFor(model => model.VehicleIdentifierCard)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.VehicleIdCardExpiration)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.VehicleIdCardExpiration)
            @Html.ValidationMessageFor(model => model.VehicleIdCardExpiration)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>

        <p>
            @Html.ActionLink("cancel", "Cancel") 
        </p>
    </fieldset>
}
                    
<div class="imageCenter">
    @Html.Partial("UploadImageModal", Model.UserVehicleID)
</div>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
